package view.ui 
{
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	
	/**
	 * ...
	 * @author Qi Donghui
	 */
	public class SubInfoView extends Sprite 
	{
		private var _bg:MovieClip;
		
		public function SubInfoView() 
		{
			addEventListener(Event.ADDED_TO_STAGE, onAddToStage);
		}
		
		private function onAddToStage(e:Event):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, onAddToStage);
			
			_bg = new SKcontentRBg();
			addChild(_bg);
				
			this.y = 47;
			this.x = 610;
			
			onStageResize();
			stage.addEventListener(Event.RESIZE, onStageResize);
		}
		
		private function onStageResize(evt:Event = null):void
		{
			_bg.height = stage.stageHeight - 47;
			if (stage.stageWidth < 960) this.x = 600;
			else {
				this.x = stage.stageWidth - 0.5 * (stage.stageWidth  - 960) - 360;
			}			
		}
		
	}

}